-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test updates for LLVM18 #4452
Test updates for LLVM18 #4452
Conversation
…matrix` LLVM-D158137 renamed the `overriding-t-option` warning to `overriding-option`. To support transitioning, let's try to disable both and tell the compiler to ignore unrecognized warning options.
Clang 18 has started diagnosing uses of designated initializers that omit initializers for members without default initializers. This change adds default initializers to types we control and avoids using designated initializers for types we do not. This only affects a couple of tests.
Clang warns that "use of NaN is undefined behavior due to the currently enabled floating-point options" in some floating-point contract modes.
Clang 18 SFINAES away the return type in C++23. I've made this compiler-agnostic with the expectation that other compilers will follow suit.
#if !_HAS_CXX23 | ||
// The return type of equal_to<void>::operator()(T, U) SFINAEs | ||
// when T and U are different enumeration types. | ||
assert(equal_fn(begin(arr3), end(arr3), begin(arr4), end(arr4), equal_to<>{})); | ||
#endif // !_HAS_CXX23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built-in comparison between different enumeration types is removed in C++26 via WG21-P2864R2.
It seems that Clang only applies the removal to C++26 mode (Godbolt link). Why is C++23 mode affected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly because we're passing /std:c++latest
and it's being detected as C++26?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, /std:c++latest
is probably mapped to -std=c++2c
by Clang 18+ so C++26 core features become available (Godbolt link). 😿 There seems an issue that we can't specify C++23 mode because /std:c++23
is not yet available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really this ought to be // TRANSITION, _HAS_CXX26
but it's not worth resetting testing.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for scouting ahead and fixing this stuff up! 🛠️ 🏞️ 😻 |
A few minimal test updates to respond to Clang changes in LLVM 18.1.0 rc4. No product code changes are needed.
By commit for ease of review:
-Wno-overriding-option
to Clang lines infloating_point_model_matrix
: LLVM-D158137 renamed theoverriding-t-option
warning tooverriding-option
. To support transitioning, let's try to disable both and tell the compiler to ignore unrecognized warning control options.missing-field-initializer
warnings: Clang has started diagnosing uses of designated initializers that omit initializers for members without default initializers. This change adds default initializers to types we control and avoids using designated initializers for types we do not. This only affects a couple of tests.GH_000935_complex_numerical_accuracy
: Clang warns that "use of NaN is undefined behavior due to the currently enabled floating-point options" in some floating-point contract modes.equal_to<void>
with different enumerations: Clang SFINAES away the return type in C++23. I've disabled this case for all compilers with the expectation that other compilers will eventually behave similarly.